package com.example.miniodemo.pojo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 文章表
 *
 * @author Lv
 * @date 2022/11/11
 */
@Data
@TableName(value = "article")
public class Article implements Serializable {
    /**
     * 文章id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 文章标题
     */
    @TableField(value = "article_title")
    private String articleTitle;

    /**
     * 文章内容
     */
    @TableField(value = "article_content")
    private String articleContent;

    /**
     * 文章作者名称
     */
    @TableField(value = "article_author")
    private String articleAuthor;

    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField(value = "publish_time")
    private Date publishTime;

    /**
     * 文件id
     */
    @TableField(value = "file_id")
    private Integer fileId;

    private static final long serialVersionUID = 1L;
}